<script setup>
import { ref } from 'vue'
import DocEdit from './components/DocEdit.vue'
import { APP_EQUIP_NAME, EQUIP_CATEGORY, EQUIP_BUCKET } from '@/constants/appname.js'
const activeTabName = ref('RULES')
const labels = ref([
  {
    label: '规章制度',
    name: 'RULES',
  },
  {
    label: '设备知识',
    name: 'EQUIPINFO',
  },
  {
    label: '故障库',
    name: 'FAULTLIB',
  },
])
</script>

<template>
  <div style="width: 100%; height: 90%;">
    <el-tabs v-model="activeTabName" type="border-card" tab-position="top" style="height: 100%;">
      <el-tab-pane v-for="(item, index) in labels" :key="index" :label="item.label" :name="item.name">
        <doc-edit :appname="APP_EQUIP_NAME.code" :category="EQUIP_CATEGORY[`${item.name}`]"
          :bucket-name="EQUIP_BUCKET.EQUIPMENT"></doc-edit>
      </el-tab-pane>
    </el-tabs>
  </div>

</template>

<style></style>